package com.xumx.demo.repository;

import com.xumx.demo.pojo.Order;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface OrderRepository extends CrudRepository<Order, Long> {
    // 根据用户ID查询订单
    List<Order> findByUserId(Integer userId);

    List<Order> searchOrderByOrderNo(String orderNo);
}